package com.itheima.objectstream;

import com.itheima.domain.Student;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class Demo01 {

    public static void main(String[] args) throws IOException {

        Student cai = new Student("吴签签", 28,"海淀监狱");
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("day13\\student2.txt"));
        oos.writeObject(cai);
        oos.close();

    }
}
